package com.lensong.plugin.stayhome.config;

import com.lensong.plugin.stayhome.service.impl.StayHomeServiceImpl;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * Copyright （c）. All rights reserved.
 *
 * @author len.song
 * @date 2022/04/26
 */
@Configuration
@EnableConfigurationProperties({StayHomeProperties.class})
public class StayHomeAutoConfig {

    @Resource
    private StayHomeProperties stayHomeProperties;


    @Bean
    public StayHomeServiceImpl stayHomeService() {
        return new StayHomeServiceImpl(stayHomeProperties.getAccessPlatformCode(), stayHomeProperties.getBizCode());
    }
}
